package org.createModel.singleton.demo5;

/**
 * 懒汉式
 * 静态内部类
 */
public class Singleton {
    private Singleton() {};

    private static class SingletHolder {
        private static final Singleton INSTANCE = new Singleton();
    }

    public static Singleton getInstance() {
        return SingletHolder.INSTANCE;
    }
}
